/**
 * Created by kfyy035 on 2018/7/12.
 */
import request from '@/utils/request'

// 获取属性列表
export function getPropList(data) {
  return request({
    url: '/backend/attr',
    method: 'get',
    params: data
  })
}
// 获取一级属性列表
export function firstPropList(data) {
  return request({
    url: '/backend/attr/get-class1-list',
    method: 'get',
    params: data
  })
}
// 添加一级属性
export function addFirst(data) {
  return request({
    url: '/backend/attr/create-class-one',
    method: 'get',
    params: data
  })
}
// 添加二级属性
export function addSecond(data) {
  return request({
    url: '/backend/attr/create-class-two',
    method: 'get',
    params: data
  })
}
// 删除属性
export function deleteProperty(data) {
  return request({
    url: '/backend/attr/delete-attr-class',
    method: 'get',
    params: data
  })
}
// 修改一级属性
export function updateFirst(data) {
  return request({
    url: '/backend/attr/update-class-one',
    method: 'get',
    params: data
  })
}
// 修改二级属性
export function updateSecond(data) {
  return request({
    url: '/backend/attr/update-class-two',
    method: 'get',
    params: data
  })
}
// 启用或停用
export function statusUpdate(data) {
  return request({
    url: '/backend/attr/close-or-start',
    method: 'get',
    params: data
  })
}
// 获取属性数量
export function getPropNum(data) {
  return request({
    url: '/backend/attr/get-attr-num',
    method: 'get',
    params: data
  })
}
